<template>
	<!-- 法人酒店记账 -->
	<view class="container" >
		<uni-transition :duration="1000" :mode-class="'slide-bottom'"  :show="true" >
			<view class="" v-if="object.adopt_id==2" style="text-align: center;margin: 20rpx 0;">
				<text style="color:#FC3E2C;font-weight: bold;" >未通过原因:{{object.fail}}</text>
			</view>
		</uni-transition>
		
	   <form @submit="formSubmit" @reset="formReset">
		<uni-transition :duration="1000"  :mode-class="'slide-right'"  :show="true" >
	   	<view class="container-back">
			<view class="back padding20  " >
				<view class="fontWeight" style="margin-bottom: 20rpx;">日期</view>
				<u-line color="#dadada" style=""></u-line>
				<view class="" @click="dateChange" style="display: flex;justify-content: space-between;margin-top: 20rpx;">
					<text>{{date}}</text>
					<img style="width: 20rpx;height:20rpx;" src="../static/right.png" alt="">
				</view>
			</view>
	   		<view class="back padding20 margin-top20">
	   			<view class="flex Jbetween padding-bottom20 ">
	   				<view class="fontWeight">本月酒店总客房数</view>
	   				<view class="textColor fontWeight">总客房数：{{Number(king)+Number(double)+Number(more)+Number(family)+Number(suite)+Number(other_bed) || 0}} 间 </view>
	   			</view>
	   			<view class="travel-list flex Jbetween Acenter page"  >
	   				<view class="flex Acenter " style="flex: 5;">
	   					<view class="block-back inline-block travel-img flex Jcenter Acenter">
	   						<image style="width: 70rpx;height: 70rpx;" src="../../../static/dachuangfang.png" mode="">
	   						</image>
	   					</view>
	   					<text class="fontWeight" style="color: #515151;">大床房</text>
	   				</view>
	   				<view class="flex Acenter" style="flex: 5;">
	   					<input type="digit" placeholder="点击输入" class="padding-left30" name="king" :value="king"  @input="kingChange"/>
							<text style="flex: 2;text-align: right;">间</text>
	   				</view>
	   			</view>
					<view class="travel-list flex Jbetween Acenter page"  >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 60rpx;height: 60rpx;" src="../../../static/shuangchuangfang.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">双床房</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="double"  @input="doubleChange" :value="double" />
							<text style="flex: 2;text-align: right;">间</text>
						</view>
					</view>
	   			<view class="travel-list flex Jbetween Acenter page"  >
	   				<view class="flex Acenter " style="flex: 5;">
	   					<view class="block-back inline-block travel-img flex Jcenter Acenter"  >
	   						<image style="width: 50rpx;height: 50rpx;" src="../../../static/sanchuang.png" mode="">
	   						</image>
	   					</view>
	   					<text class="fontWeight" style="color: #515151;">3床房以上</text>
	   				</view>
	   				<view class="flex Acenter" style="flex: 5;">
	   					<input type="digit" placeholder="点击输入" class="padding-left30" name="more" @input="moreChange" :value="more"  />
							<text style="flex: 2;text-align: right;">间</text>
	   				</view>
	   			</view>
	   			<view class="travel-list flex Jbetween Acenter page"  >
	   				<view class="flex Acenter " style="flex: 5;">
	   					<view class="block-back inline-block travel-img flex Jcenter Acenter">
	   						<image style="width: 50rpx;height: 50rpx;" src="../../../static/jiating.png" mode="">
	   						</image>
	   					</view>
	   					<text class="fontWeight" style="color: #515151;">家庭房</text>
	   				</view>
	   				<view class="flex Acenter" style="flex: 5;">
	   					<input type="digit" placeholder="点击输入" class="padding-left30" name="family" @input="familyChange" :value="family"/>
							<text style="flex: 2;text-align: right;">间</text>
	   				</view>
	   			</view>
					<view class="travel-list flex Jbetween Acenter page"  >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/taofang.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">套房</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="suite" @input="suiteChange" :value="suite" />
							<text style="flex: 2;text-align: right;">间</text>
						</view>
					</view>
					<view class="flex Jbetween Acenter page" style="border-radius: 15rpx;padding: 10rpx;margin-bottom: 20rpx;">
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block flex Jcenter Acenter" style="width: 80rpx;height: 80rpx;border-radius: 15rpx;margin-right: 20rpx;">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/qita.png"
									mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">其他</text>
							<input style="flex: 1;margin-left: 30rpx;" type="text" value="" placeholder="具体名目" @input="kefangqitaChange" name="kefangqitadata"  :value="kefangmingmu" />
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="other_bed" @input="kefangqitaInput" :value="other_bed" />
							<text style="flex: 2;text-align: right;">间</text>
						</view>
					</view>
	   		</view>
	   		<view class="back padding20 margin-top20" >
	   			<view class="flex Jbetween padding-bottom20 ">
	   				<view class="fontWeight" style="flex: 2.3;">本月酒店入住率</view>
					<view class="flex Acenter" style="flex: 2;">
						<input type="digit" placeholder="点击输入" class="padding-left30"   @input="hotel_rateChange"  :value="hotel_rate" />
							<text style="flex: 2;text-align: right;">%</text>
					</view>
	   			</view>
	   			<view class="travel-list flex Jbetween Acenter page"  >
	   				<view class="flex Acenter " style="flex: 5;">
	   					<view class="block-back inline-block travel-img flex Jcenter Acenter">
	   						<image style="width: 70rpx;height: 70rpx;" src="../../../static/dachuangfang.png" mode="">
	   						</image>
	   					</view>
	   					<text class="fontWeight" style="color: #515151;">大床房</text>
	   				</view>
	   				<view class="flex Acenter" style="flex: 5;">
	   					<input type="digit" placeholder="点击输入" class="padding-left30"  name="king_rate"  :value="king_rate" />
							<text style="flex: 2;text-align: right;" @input="king_rateInput">%</text>
	   				</view>
	   			</view>
	   			<view class="travel-list flex Jbetween Acenter page"  >
	   				<view class="flex Acenter " style="flex: 5;">
	   					<view class="block-back inline-block travel-img flex Jcenter Acenter">
	   						<image style="width: 60rpx;height: 60rpx;" src="../../../static/shuangchuangfang.png" mode="">
	   						</image>
	   					</view>
	   					<text class="fontWeight" style="color: #515151;">双床房</text>
	   				</view>
	   				<view class="flex Acenter" style="flex: 5;">
	   					<input type="digit" placeholder="点击输入" class="padding-left30"  name="double_rate"  :value="double_rate" />
							<text style="flex: 2;text-align: right;" @input="double_rateInput">%</text>
	   				</view>
	   			</view>
					<view class="travel-list flex Jbetween Acenter page"  >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/sanchuang.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">3床房以上</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30"  name="more_rate"  :value="more_rate" />
							<text style="flex: 2;text-align: right;" @input="more_rateInput">%</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page"  >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/jiating.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">家庭房</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30"  name="family_rate"  :value="family_rate" />
							<text style="flex: 2;text-align: right;" @input="family_rateInput">%</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page"  >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/taofang.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">套房</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30"  name="suite_rate"  :value="suite_rate"/>
							<text style="flex: 2;text-align: right;" @input="suite_rateInput">%</text>
						</view>
					</view>
					<view class="flex Jbetween Acenter page" style="border-radius: 15rpx;padding: 10rpx;margin-bottom: 20rpx;">
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block flex Jcenter Acenter" style="width: 80rpx;height: 80rpx;border-radius: 15rpx;margin-right: 20rpx;">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/qita.png"
									mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">其他</text>
							<input style="flex: 1;margin-left: 30rpx;" type="text" value="" placeholder="具体名目" @input="ruzhulvqitaChange" name="ruzhulvqitadata"  :value="ruzhulvqitamingmu" />
							<!-- <input style="flex: 1;margin-left: 30rpx;" type="digit" value="" placeholder="具体名目" @input="ruzhulvqitaChange" name="ruzhulvqitadata"  :vlaue="ruzhulvqitamingmu"/> -->
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<!-- -->
							<input type="digit" placeholder="点击输入" class="padding-left30" name="other_rate"  @input="ruzhulvqitaInput"  :value="other_rate"/>
							<text style="flex: 2;text-align: right;">%</text>
						</view>
					</view>
	   		</view>
	   			<view class="back padding20 margin-top20" >
	   		   <view class="travel-list flex Jbetween Acenter " >
	   		   	<view class="flex Acenter " style="flex: 5;">
	   		   		<text
	   		   				class="fontWeight">本月酒店客单价</text>
	   		   	</view>
	   		   	<view class="flex Acenter" style="flex: 5;">
	   		   		<!-- <input type="digit" placeholder="点击输入" class="padding-left30" name="guest"  style="flex: 1;" :vlaue="guest"/> -->
					<input style="flex: 1;" type="digit" placeholder="点击输入客单价" class="padding-left30" name="guest" :value="guest" />
						<text style="">人民币元</text>
	   		   	</view>
					</view>
	   		   </view>
			   <view class="back padding20 margin-top20" >
					<view class="flex Jbetween padding-bottom20 ">
						<view class="fontWeight">本月营业收入</view>
						<view class="textColor fontWeight">总收入：{{Number(revenue)+Number(income)+Number(retail)+Number(other_income) || 0}} 人民币元</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page"  >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/kefang.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">客房收入</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30"  name="revenue" @input="revenueChange"  style="flex: 1;" :value="revenue"/>
							<text style="">人民币元</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page"  >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/canyinshouru.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">餐饮收入</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30"  name="income" @input="incomeChange" style="flex: 1;" :value="income"/>
							<text style="">人民币元</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page"  >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/lingshou.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">零售收入</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30"  name="retail"  @input="retailChange" style="flex: 1;" :value="retail"/>
							<text style="">人民币元</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page"  >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/qitashouru.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">其他收入</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30"  name="other_income"  @input="other_incomeChange" style="flex: 1;" :value="other_income"/>
							<text style="">人民币元</text>
						</view>
					</view>
					</view>
					  <view class="back padding20 margin-top20" >
					<view class="flex Jbetween padding-bottom20 ">
						<view class="fontWeight">本月燃气量</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page"  >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/tianranqi.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">天然气</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input style="flex: 1;" type="digit" placeholder="点击输入" class="padding-left30" name="natural_gas" :value="natural_gas" />
							<!-- <input style="flex: 1;" type="digit" placeholder="点击输入" class="padding-left30" name="natural_gas"  :vlaue="natural_gas"/> -->
							<text style="text-align: right;">标准立方米</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page"  >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/meiqi.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">煤气</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input style="flex: 1;" type="digit" placeholder="点击输入" class="padding-left30" name="coal_gas" :value="coal_gas" />
							<text style="flex: 1;text-align: right;">字</text>
						</view>
					</view>
					<view class="travel-list flex Jbetween Acenter page"  >
						<view class="flex Acenter " style="flex: 5;">
							<view class="block-back inline-block travel-img flex Jcenter Acenter">
								<image style="width: 50rpx;height: 50rpx;" src="../../../static/qita.png" mode="">
								</image>
							</view>
							<text class="fontWeight" style="color: #515151;">其他</text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input style="flex: 1;" type="text" placeholder="具体名目" class="padding-left30" name="other_gas" @input="otherChange"  :value="other_gas"/>
							<text style="flex: 1;text-align: right;"></text>
						</view>
					</view>
					</view>
					 <view class="back padding20 margin-top20" >
					<view class="travel-list flex Jbetween Acenter ">
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight" style="color: #515151;"><text
									class="">本月接待游客人数</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="number_tourists" style="flex: 1;" :value="number_tourists"/>
							<text style="">人次</text>
						</view>
					</view>
					</view>
					 <view class="back padding20 margin-top20" >
					<view class="travel-list flex Jbetween Acenter ">
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight " style="color: #515151;"><text
									class="">本月员工总数</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="total_month"  :value="total_month"/>
							<text style="flex: 2;text-align: right;">人</text>
						</view>
					</view>
					</view>
					 <view class="back padding20 margin-top20" >
					<view class="travel-list flex Jbetween Acenter ">
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight" style="color: #515151;"><text
									class="">本月员工平均工资</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="average" style="flex: 1;" :value="average"/>
							<text style="">人民币元</text>
						</view>
					</view>
						</view>
						 <view class="back padding20 margin-top20" >
					<view class="travel-list flex Jbetween Acenter ">
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight " style="color: #515151;"><text
									class="">本月用水量</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="water_consum" :value="water_consum"/>
							<text style="flex: 2;text-align: right;">吨</text>
						</view>
					</view>
						</view>
						 <view class="back padding20 margin-top20" >
					<view class="travel-list flex Jbetween Acenter ">
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight " style="color: #515151;"><text
									class="">本月用电量</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="electricity" :value="electricity"/>
							<text style="flex: 2;text-align: right;">度</text>
						</view>
					</view>
					</view>
					 <view class="back padding20 margin-top20" >
				
					<view class="travel-list flex Jbetween Acenter " >
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight " style="color: #515151;"><text
									class="">本月物业管理费用</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="property" style="flex: 1;" :value="property"/>
							<text style="">人民币元</text>
						</view>
					</view>
					</view>
					 <view class="back padding20 margin-top20" >
					<view class="travel-list flex Jbetween Acenter ">
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight " style="color: #515151;"><text
									class="">本月租赁费用</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="rental_expen" style="flex: 1;" :value="rental_expen"/>
							<text style="">人民币元</text>
						</view>
					</view>
					</view>
					 <view class="back padding20 margin-top20" >
					<view class="travel-list flex Jbetween Acenter ">
						<view class="flex Acenter " style="flex: 5;">
							<text class="fontWeight " style="color: #515151;"><text
									class="">本月维修（护）费用</text></text>
						</view>
						<view class="flex Acenter" style="flex: 5;">
							<input type="digit" placeholder="点击输入" class="padding-left30" name="mainten" style="flex: 1;" :value="mainten"/>
							<text style="">人民币元</text>
						</view>
					</view>
	   		</view>
			
	   	</view >
		 </uni-transition>
		 <view class="button-submit">
		 	<view class="button">
		 		<button  formType="submit" style="margin-top: 0; width: 100%">{{object.adopt_id==2?'重新提交':"提交"}}</button>
		 	</view>
		 </view>
	   </form>
	  
	   <!-- 日期选择器 -->
	     <u-picker mode="time"v-model="isPicderShow" :params="params" @confirm="confirm"></u-picker>
	</view>
</template> 

<script>
	import util from '../../../utils/util.js'
	export default {
	    data() {
	        return {
				 isStatus:3,//记账审核状态
				 reason:"记账不对",
				 date:'请选择',
				 isPicderShow: false,
				 loading: false,
				 object:{
				 	adopt_id: "", //审核是否通过
				 	fail: "记账内容需重新提交，有问题请联系联络人。", //未通过原因
				 	type_id:""//1  参团   2  非参团
				 },
				 
				 params: {
					year: true,
					month: true,
					day: false,
					hour: false,
					minute: false,
					second: false
				 },
				  id:'',//用户id
				  user_type:'',//.法人 自然人 联络人
				  year: '', //当前年份
				  month: '', //当前月份
				  business_specific_type:'',//具体业务类型
				  operating:"",//本月营业总收入
				  total_hotel:"",//总客房数
				  king:'',//大床房
				  king_rate:'',//大床房入住率
				  double_rate:'',//双床房入住率
				  double:'',//双床房
				  more:'',//3创房以上
				  more_rate:'',//3床房以上入住率
				  family:'',//家庭房
				  family_rate:'',//家庭房入住率
				  suite:'',//套房
				  suite_rate:'',//套房入住率
				  other_rate:'',//本月酒店入住率其它入住率
				  other_bed:'',//其他
				  guest:'',//本月酒店客单价
				  revenue:'',//客房收入
				  income:"",//餐饮收入
				  retail:'',//零售收入
				  other_income:'',//其他收入
				  other_gas:'',//本月燃气量其它名目
				  coal_gas:"",//煤气
				  natural_gas:"",//天然气
				  number_tourists:'',//本月接待游客人数
				  total_month:"",//本月员工总数
				  average:"",//本月员工平均工资
				  water_consum:"",//本月用水量
				  electricity:"",//本月用电量
				  property:"",//物业管理费
				  rental_expen:"",//租赁费
				  mainten:"",//维修费用
				  otherName:'',//具体名目
				  kefangmingmu:"",//客房名目
				  kefangqitadata:'',//客房输入数据
				  ruzhulvqitamingmu:'',//入住率其他名目
				  ruzhulvqitadata:'',//入住率其他输入数据
				   hotel_rate:"",//酒店入住率
				   timestamp:'',//当前日期时间
				   jizhang_score:null,//记账累计分数
				   ID:""//重新提交传递的ID
			  }
		},
		onLoad(options) {
			var myDate = new Date();//获取系统当前时间
			this.timestamp=myDate .getDate(); //获取当前日(1-31)
			var  year=myDate.getFullYear()
			var  month=myDate.getMonth()+1
			if(this.timestamp<10){//10号以内积分10分 否则积分1分
				this.jizhang_score=3
			}else{
				this.jizhang_score=1
			}
			
			let userInfo=uni.getStorageSync("userInfo")
			
			var ID=userInfo[0].id//用户id赋值
			
			if(userInfo){
				if(userInfo.user_type==="法人"){
					this.user_type=1
				}else if(userInfo.user_type==="联络人"){
					this.user_type=2
				}
				this.business_specific_type=userInfo[0].business_specific_type
			}
			var params= JSON.parse(options.item)
			console.log('获取历史记账页传递过来的列表参数paramsparamsparams',params)
			if(params.clickType==='new'){//说明是重新提交跳转过来的
			
				console.log('走的重新提交跳转过来的', params)
				this.date=year+" 年 "+params.month+" 月 "
				this.year=year
				this.month=params.month
				this.object.adopt_id = params.adopt_id   //1  待审核   2  未通过  3.已通过
				this.object.fail = params.fail?params.fail:"记账内容需重新提交，有问题请联系联络人。" //失败原因
				this.object.type_id=params.type_id//法人记账类型
				this.id=params.id
				console.log('最终赋值后的参数',params,this.object)
				
				let obj={
					id: params.id,
					user_type : params.user_type,
					month:params.month,
					keyword:params.col == 1 ? 'totel' : 'turnover',
					type_id:params.type_id
				}
				// 调用详情赋值数据
				this.getBillDetails(obj)
				
			}else if(params.clickType==='add'){ 
				
				this.id=userInfo[0].id
				console.log('month',month)
				
				if(month==1){
					this.month=12
					this.year=year-1//去上个年份
				}else{
					this.year=year
					this.month=month
				}
				// 赋值年份和月份
				this.date=year+" 年 "+month+" 月 "
				console.log('正常点击加号跳转过来的正常点击加号跳转过来的正常点击加号跳转过来的正', params,this.id)
			}else if(params.clickType==='month'){
				console.log('点击月份跳转进来德点击月份跳转进来德点击月份跳转进来德点击月份跳转进来德', params)
				if(params.month){//如果有值说明是点击了日历月份。。否则就正常传递当前鱼粉
					let newMonth=Number(params.month)
					console.log('有值',newMonth)
					this.month=newMonth
				    // 赋值年份和月份
					this.date=params.year+" 年 "+params.month+" 月 "
					this.year=params.year
					
				}else {//否则赋值当前年份和月份 
					this.date=year+" 年 "+month+" 月 "
				}
				this.id=params.id
				console.log('之后',this.month)
			}else{
				console.log('联络人帮忙记账过来的',params)
				this.id=params.id
				this.year=params.year
				this.month=params.month
				this.business_specific_type=params.business_specific_type
				this.jizhang_score=params.jizhang_score
				this.user_type=params.user_type
				this.date=params.year+" 年 "+params.month+" 月 "//日期自动赋值
			}
			
		},
		methods:{
			king_rateInput:function(e){
				console.log('大床房入住率',e)
				this.king_rate= e.detail.value //大创房入住率
			},
			double_rateInput:function(e){
				this.double_rate = e.detail.value//双床房入住率
			},
			more_rateInput:function(e){
				this.more_rate= e.detail.value//3床房以上入住率
			},
			// 家庭房入住率
			family_rateInput:function(e){
				this.family_rate= e.detail.value
			},
			// 套房入住率
			suite_rateInput:function(e){
				this.suite_rate=e.detail.value
			},
			kingChange: function(e) {this.king= e.detail.value},//大床房
			hotel_rateChange: function(e) {this.hotel_rate= e.detail.value},//大床房
			doubleChange: function(e) {this.double= e.detail.value},//双床房
			moreChange: function(e) {this.more= e.detail.value},//双床房
			familyChange: function(e) {this.family= e.detail.value},//双床房
			suiteChange: function(e) {this.suite= e.detail.value},//双床房
			other_bedChange: function(e) {this.other_bed= e.detail.value},//双床房
			revenueChange: function(e) {this.revenue= e.detail.value},//双床房
			incomeChange: function(e) {this.income= e.detail.value},//双床房
			retailChange: function(e) {this.retail= e.detail.value},//双床房
			other_incomeChange: function(e) {this.other_income= e.detail.value},//双床房
			otherNameChange:function(e){this.otherName=e.detail.value},
			otherChange:function(e){this.others=e.detail.value},
			kefangqitaChange:function(e){
				this.kefangmingmu=e.detail.value
			},
			kefangqitaInput:function(e){
				this.kefangqitadata=e.detail.value
			},
			ruzhulvqitaChange:function(e){
				this.ruzhulvqitamingmu=e.detail.value
				console.log('this.ruzhulvqitamingmu',this.ruzhulvqitamingmu)
			},
			ruzhulvqitaInput:function(e){
				this.ruzhulvqitadata=e.detail.value
			},
			
			// 获取详情数据
			getBillDetails(obj) {
				console.log('即将请求数据',obj)
				this.ID=obj.id
				var _self = this;
				this.$.tipLoading('加载中')
				uni.request({
					method: 'POST',
					url: 'https://jizhang.xqyu.cn/index.php/api/index/get_bill_details',
					dataType: 'json',
					header: {
						'content-type': 'application/x-www-form-urlencoded'
					},
					data:obj,
					success: function(res) {
							if(res.data.code==1){
								let result=res.data.data
								console.log('获取历史记账页法人渲染的数据',result)
								_self.king=result.king//酒店大床房赋值
								_self.double=result.double//酒店双床房赋值
								_self.more=result.more//酒店双床房赋值
								_self.family=result.family//酒店家庭房房赋值
								_self.suite=result.suite//酒店套房赋值
								
								_self.other_bed=(result.other_bed).split('-')[0]//酒店客房房房赋值
								_self.kefangmingmu=(result.other_bed).split('-')[1]//酒店客房其他赋值
								
								_self.hotel_rate=result.hotel_rate//本月酒店入住率赋值
								_self.king_rate=result.king_rate//大床房入住率赋值
								_self.double_rate=result.double_rate//双床房入住率房赋值
								_self.more_rate=result.more_rate//3床房以上入住率赋值
								_self.family_rate=result.family_rate//家庭房入住率房赋值 
								_self.suite_rate=result.suite_rate//套房房赋值
								_self.other_rate=(result.other_rate).split('-')[0]//其它入住率赋值
								_self.ruzhulvqitamingmu=(result.other_rate).split('-')[1]//其它入住率名目 赋值
								_self.guest=result.guest//本月酒店客单价赋值
								_self.income=result.income//餐饮收入赋值
								_self.revenue=result.revenue//客房收入赋值
								_self.retail=result.retail//零售收入赋值
								_self.other_income=result.other_income//其它收入赋值
								
								
								_self.natural_gas=result.natural_gas//天然气赋值
								_self.coal_gas=result.coal_gas//煤气赋值
								_self.other_gas=result.other_gas//本燃气量其它名目赋值
								_self.number_tourists=result.number_tourists//本月接待游客人数赋值
								_self.total_month=result.total_month//本月员工总数赋值
								_self.average=result.average//本月员工平均工资赋值
								_self.water_consum=result.water_consum//本月用水量赋值
								_self.electricity=result.electricity//本月用电量赋值
								_self.property=result.property//本月物业管理费赋值
								_self.rental_expen=result.rental_expen//租赁费赋值
								_self.mainten=result.mainten//本月维修费用赋值
								_self.$.hideLoading()
							}else{
								_self.$.hideLoading()
								_self.$.toast(res.data.msg)
							}
					
						
						
					}
				})
			},
			
			// 日期选择器打开
			dateChange:function(){
				
				this.isPicderShow=true
				console.log('打开',this.isPicderShow)
			},
			// 日期选择器确定
			confirm:function(e){
				console.log('日期选择器确定',e)
				let year=Number(e.year) 
				let month= Number(e.month)
				var myDate = new Date();//获取系统当前时间
				let newYear=myDate.getFullYear()
				let newMonth=myDate.getMonth()+1
				console.log('nia',year)
				console.log('nia1',newYear)
				if(year>newYear){
					this.$.toast('不支持之后年份记账')
					return
				}
				if(month>newMonth){
					this.$.toast('不支持之后月份记账')
					return
				}
				this.date=year+" 年 "+month+" 月 "
			},
			// 表单提交
			formSubmit: function (e) {
				console.log('e',e)
			    var that = this;
				e.detail.value.year=this.year 
				e.detail.value.month=this.month
				e.detail.value.jizhang_score=this.jizhang_score
				e.detail.value.uid=this.id
				e.detail.value.type_id=this.business_specific_type
				e.detail.value.flag=this.user_type
				let data =e.detail.value
				let {king, double, more, family, suite, other_bed, king_rate, double_rate, more_rate ,family_rate, suite_rate, other_rate, guest, revenue, income, retail, other_income, number_tourists,total_month,average, water_consum, electricity, natural_gas, coal_gas, otherName, other_gas, property, rental_expen, mainten}=data//结构对象
				
				console.log('传递的detail',e.detail.value)
			   if(!king ){this.$.toast('请输入大床房')
			   return}
			   if(!double ){this.$.toast('请输入双床房')
			   return}
			   if(!more ){this.$.toast('请输入3床房以上')
			   return}
			   if(!family ){this.$.toast('请输入家庭房')
			   return}
			   if(!suite ){this.$.toast('请输入套房')
			   return}
			   if(!other_bed ){this.$.toast('请输入本月酒店总客房数里的其他客房')
			   return}
			   if(Number(other_bed)>0 && this.kefangmingmu==""){
				   this.$.toast('请输入本月酒店总客房数里的其他客房名目')
				   return
			   }
			   if(this.hotel_rate==""||this.hotel_rate.length==0){this.$.toast('请输入本月酒店入住率')
			   return}
			   if(Number(this.hotel_rate)>100){
				   this.$.toast('本月酒店入住率大于100%，请输入正确的入住率')
				   return
			   }
			   if(!king_rate ){this.$.toast('请输入大床房入住率')
			   return}
			   if(Number(king_rate)>100){
			   				   this.$.toast('大床房入住率大于100%，请输入正确的入住率')
			   				   return
			   }
			   if(!double_rate ){this.$.toast('请输入双床房入住率')
			   return}
			   if(Number(double_rate)>100){
			   				   this.$.toast('双床房入住率大于100%，请输入正确的入住率')
			   				   return
			   }
			   if(!more_rate ){this.$.toast('请输入3床房以上入住率')
			   return}
			   if(Number(more_rate)>100){
			   				   this.$.toast('3床房入住率大于100%，请输入正确的入住率')
			   				   return
			   }
			   if(!family_rate ){this.$.toast('请输入家庭房入住率')
			   return}
			   if(Number(family_rate)>100){
			   				   this.$.toast('家庭房入住率大于100%，请输入正确的入住率')
			   				   return
			   }
			   if(!suite_rate ){this.$.toast('请输入套房入住率')
			   return}
			   if(Number(suite_rate)>100){
			   				   this.$.toast('套房入住率大于100%，请输入正确的入住率')
			   				   return
			   }
			   if(!other_rate ){this.$.toast('请输入其他房入住率')
			   return}
			   if(Number(other_rate)>100){
			   				   this.$.toast('其他房住率大于100%，请输入正确的入住率')
			   				   return
			   }
			   if(Number(other_rate)>0 && !this.ruzhulvqitamingmu){
				   this.$.toast('请输入其他房入住率里的名目')
				   return
			   }
			   if(!guest ){this.$.toast('请输入本月酒店客单价')
			   return}
			   if(!revenue ){this.$.toast('请输入客房收入')
			   return}
			   if(!income ){this.$.toast('请输入餐饮收入')
			   return}
			   if(!retail ){this.$.toast('请输入零售收入')
			   return}
			   if(!other_income ){this.$.toast('请输入其他收入')
			   return}
			   if(!natural_gas ){this.$.toast('请输入天然气')
			   return}
			   if(!coal_gas ){this.$.toast('请输入煤气')
			   return}
			   
			   if(!number_tourists ){this.$.toast('请输入本月接待游客人数')
			   return}
			   if(!total_month ){this.$.toast('请输入本月员工总数')
			   return}
			   if(!average ){this.$.toast('请输入本月员工平均工资')
			   return}
			   if(!water_consum ){this.$.toast('请输入本月用水量')
			   return}
			   if(!electricity ){this.$.toast('请输入本月用电量')
			   return}
			   // if(this.other_gas=="" ){this.$.toast('请输入其他')
			   // return}
			   if(!property ){this.$.toast('请输入本月物业管理费用')
			   return}
			   if(!rental_expen ){this.$.toast('请输入本月租赁费用')
			   return}
			   if(!mainten ){this.$.toast('请输入本月维修（护）费用')
			   return}
			   
			   e.detail.value.total_hotel=Number(e.detail.value.king)+Number(e.detail.value.double)+Number(e.detail.value.more)+Number(e.detail.value.family)+Number(e.detail.value.suite)+Number(e.detail.value.other_bed)
			   e.detail.value.other_bed=e.detail.value.other_bed+'-'+e.detail.value.kefangqitadata
			   e.detail.value.other_rate=e.detail.value.other_rate+'-'+e.detail.value.ruzhulvqitadata
			   e.detail.value.peting_income=Number(e.detail.value.revenue)+Number(e.detail.value.income)+Number(e.detail.value.retail)+Number(e.detail.value.other_income)
			    e.detail.value.hotel_rate= this.hotel_rate
				e.detail.value.adopt_id=1  //1  待审批   2  未通过  3  已通过  4 初审通过
				e.detail.value.id=this.id  //重新提交传递的ID
				this.formRequest(e.detail.value)
			},
			formRequest:function(params){
				
				
				
				delete params.otherName//删除对象属性
				delete  params.ruzhulvqitadata
				delete  params.kefangqitadata
				
				if(this.object.adopt_id==2){
					// 只有重新提交的时候才删除uid  传id
					delete params.uid
				}else {
					delete params.id
				}
				console.log('法人提交的数据法人提交的数据法人提交的数据法人提交的数据',params, this.object.adopt_id)
				var that = this
				uni.showModal({
					title: '温馨提示',
					content: '确认提交后不可修改',
					success: function (res) {
						if (res.confirm) {
							uni.request({
								method: 'POST',
								url: 'https://jizhang.xqyu.cn/index.php/api/legal/get_hotel',
								dataType: 'json',
								header: {
									'content-type': 'application/x-www-form-urlencoded'
								},
								data: params,
								success: function(res) {
									console.log('最终是否成功了',res.data)
									if(res.data.code==1){
										that.$.successToast(res.data.msg)
										//返回上一页
										setTimeout(function(){
											uni.navigateBack({delta:1})
										},1500)
									}else {
										that.$.toast(res.data.msg)
									}
								}
							});
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
				
			}
			
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		background-color: #F5F5F5;
		.container-back{
			border-radius: 15rpx;
			padding: 20rpx;
			.travel-list {
				border-radius: 15rpx;
				padding: 10rpx;
				margin-bottom: 20rpx;
			
				.travel-img {
					width: 80rpx;
					height: 80rpx;
					border-radius: 15rpx;
					margin-right: 20rpx;
				}
			
				.before::before {
					content: '';
					width: 15rpx;
					height: 15rpx;
					border-radius: 50%;
					background-color: #1D69FC;
					position: absolute;
					margin-top: 12rpx;
					// margin-left: -30rpx;
				}
			}
			
			.travel-img {
				width: 80rpx;
				height: 80rpx;
				border-radius: 15rpx;
			}
		}
		.button-submit {
			background-color: #FFFFFF;
			position: fixed;
			margin-right: 20rpx;
			bottom: 0;
			width: 100%;
			padding-bottom: 30rpx;
			z-index: 1000;
			padding-left: 20rpx;
			padding-right: 20rpx;
			padding-top: 20rpx;
			.button{
				border-radius: 15rpx;
				button {
					background: linear-gradient(159deg, #80e6fc 0%, #0051ff 99%);
					// width: 100%;
					color: #FFFFFF;
					font-size: 30rpx;
				}
			}
		}
	}
</style>
